import { sendRequest } from '@/http';

/* 分页列表查询 */
export const queryList = (params: any) =>
  sendRequest({
    url: `/admin/rbac/permissions`,
    method: 'get',
    params,
  });

export const editPermission = (data: any) =>
  sendRequest({
    url: `/admin/rbac/editPermission`,
    method: 'post',
    data,
  });

export const addPermission = (data: any) =>
  sendRequest({
    url: `/admin/rbac/addPermission`,
    method: 'post',
    data,
  });

export const deletePermission = (id: string) =>
  sendRequest({
    url: `/admin/rbac/deletePermission/${id}`,
    method: 'delete',
  });
